/*
 * @Author: 姚沈阳 11500793+yao-shenyang@user.noreply.gitee.com
 * @Date: 2023-10-19 20:26:48
 * @LastEditors: 姚沈阳 11500793+yao-shenyang@user.noreply.gitee.com
 * @LastEditTime: 2023-10-19 20:28:05
 * @FilePath: \uni-preset-vue-vite-ts\uniCloud-aliyun\cloudfunctions\code\index.js
 * @Description: 
 * qq1908552310
 */
'use strict';
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	const svgCaptcha = require('svg-captcha');
	const captcha = svgCaptcha.create();
	const { text, data } = captcha;
	//返回数据给客户端
	return {
		code: 0,
		data: {
			text,
			svg: data
		}
	};
};
